package com.hzcx.app.simplechat.ui.setting.presenter;

import android.app.Activity;
import android.content.Context;
import android.net.Uri;

import com.hzcx.app.simplechat.api.BaseDialogObserver;
import com.hzcx.app.simplechat.api.BaseObserver;
import com.hzcx.app.simplechat.base.BaseEmptyBean;
import com.hzcx.app.simplechat.base.BasePresenter;
import com.hzcx.app.simplechat.bean.UpLoadImgBean;
import com.hzcx.app.simplechat.model.PublicModel;
import com.hzcx.app.simplechat.model.SettingModel;
import com.hzcx.app.simplechat.model.UserModel;
import com.hzcx.app.simplechat.ui.setting.bean.BlackListBean;
import com.hzcx.app.simplechat.ui.setting.bean.ReportBean;
import com.hzcx.app.simplechat.ui.setting.contract.BlackListContract;
import com.hzcx.app.simplechat.ui.setting.contract.ReportContract;
import com.hzcx.app.simplechat.util.empty.EmptyUtils;
import com.hzcx.app.simplechat.util.file.FileUtils;
import com.hzcx.app.simplechat.util.token.TokenUtils;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class BlackListPresenter extends BasePresenter<BlackListContract.View> implements BlackListContract.Presenter {

    /**
     *  获取黑名单列表
     * @param context
     */
    @Override
    public void getBlackList(Context context) {
        SettingModel.getBlackList(context, new BaseDialogObserver<List<BlackListBean>>(context) {
            @Override
            protected void onSuccess(List<BlackListBean> data) {
                mView.blackListResult(data);
            }
        });
    }

    /**
     *  移除黑名单
     * @param context
     * @param id
     */
    @Override
    public void putUserOutBlack(Context context, int id,int pos) {
        UserModel.putUserOutBlack(context, id, new BaseDialogObserver<BaseEmptyBean>(context) {
            @Override
            protected void onSuccess(BaseEmptyBean data) {
                mView.outBlackSuccess(pos);
            }
        });
    }
}
